/*
 * IJobService.java
 *
 * Copyright 2012 the original author or authors(ninglong).
 *
 * Licensed under the org.geek.job.service.impl, Version 1.0 (the "License");
 *
 */
package org.geek.job.service;

import org.geek.domain.Job;

/**
 * <p></p>
 * @author ninglong bhd2973@qq.com
 * @version V1.0
 */
public interface IJobService {
	/**
	 * 启动服务
	 */
	void start();
	
	/**
	 * 加载持久化的job
	 */
	void loadSerialJob();
	
	/**
	 * 启动一个job
	 * @param job
	 * @return
	 */
	boolean startJob(Job job);
	
	/**
	 * 删除一个job
	 * @param groupName
	 * @param groupId
	 * @return
	 */
	boolean delJob(String groupName,String groupId);
	
	/**
	 * 判断job是否在job池中
	 * @param jobKey
	 * @return
	 */
	boolean hasJob(String jobKey);
}
